package com.qianxiwitmanagement.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qianxi.wit.pojo.TbConsult;
import com.qianxi.wit.pojo.TbDoctor;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient("qianxiwit-service")
public interface TbConsultService {
    //点击咨询，生成问诊记录[订单]
    @PostMapping("/insert")
    TbConsult insert(@RequestBody TbConsult consult);

    //快速问诊医生列表页面，查询时绑定doctor对象中的doctor_name属性去查询
    @PostMapping("/findDoctor/{page}/{size}/{ids}")
    Page<TbDoctor> findbydoctor(@PathVariable("page") int page,
                                @PathVariable("size") int size,
                                @PathVariable("ids") Long[] ids,
                                @RequestBody TbDoctor doctor);

    @PostMapping("/patientName")
    List<TbConsult> selectList(@RequestBody String patientName);
}
